package IC;

import IC.AST.ASTNode;

public class SemanticException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4864519488052187783L;
	
	private ASTNode m_Node;
	
	public SemanticException(String message, ASTNode node)
	{
		super(message);
		
		m_Node = node;
	}

	@Override
	public String toString()
	{
		return String.format("semantic error at line %d: %s\n", m_Node.getLine(), getMessage());
	}
}

